// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_SALES_CONTRACT_REVIEW_ITEM
// * CreateDate    : 2014-06-05 18:30:36
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:36
// * LastChanger   : 2014-06-05 18:30:36
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class SalesContractReviewItemEntity : EntityBase
    {
        public SalesContractReviewItemTable TableSchema
        {
            get
            {
                return SalesContractReviewItemTable.Current;
            }
		}
		
		public SalesContractReviewItemEntity()
        {

        }
		
		public SalesContractReviewItemEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.ReviewNo = Convert.ToString(CommonFunctions.ToObject(dr["REVIEW_NO"]));
			this.MaterialId = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL_ID"]));
			this.MaterialName = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL_NAME"]));
			this.Material = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL"]));
			this.Std = Convert.ToString(CommonFunctions.ToObject(dr["STD"]));
			this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
			this.ReqDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["REQ_DATE"]));
			this.Price = Convert.ToDecimal(CommonFunctions.ToObject(dr["PRICE"]));
			this.IsTax = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_TAX"]));
        }
		
		public SalesContractReviewItemEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.ReviewNo = Convert.ToString(CommonFunctions.ToObject(dr["REVIEW_NO"]));
			this.MaterialId = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL_ID"]));
			this.MaterialName = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL_NAME"]));
			this.Material = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL"]));
			this.Std = Convert.ToString(CommonFunctions.ToObject(dr["STD"]));
			this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
			this.ReqDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["REQ_DATE"]));
			this.Price = Convert.ToDecimal(CommonFunctions.ToObject(dr["PRICE"]));
			this.IsTax = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_TAX"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return SalesContractReviewItemTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(SalesContractReviewItemTable.C_ID)); }
            set { SetData(SalesContractReviewItemTable.C_ID, value); }
        }
		
        [DataMember]
        public string ReviewNo
        {
            get { return Convert.ToString(GetData(SalesContractReviewItemTable.C_REVIEW_NO)); }
            set { SetData(SalesContractReviewItemTable.C_REVIEW_NO, value); }
        }
		
        [DataMember]
        public string MaterialId
        {
            get { return Convert.ToString(GetData(SalesContractReviewItemTable.C_MATERIAL_ID)); }
            set { SetData(SalesContractReviewItemTable.C_MATERIAL_ID, value); }
        }
		
        [DataMember]
        public string MaterialName
        {
            get { return Convert.ToString(GetData(SalesContractReviewItemTable.C_MATERIAL_NAME)); }
            set { SetData(SalesContractReviewItemTable.C_MATERIAL_NAME, value); }
        }
		
        [DataMember]
        public string Material
        {
            get { return Convert.ToString(GetData(SalesContractReviewItemTable.C_MATERIAL)); }
            set { SetData(SalesContractReviewItemTable.C_MATERIAL, value); }
        }
		
        [DataMember]
        public string Std
        {
            get { return Convert.ToString(GetData(SalesContractReviewItemTable.C_STD)); }
            set { SetData(SalesContractReviewItemTable.C_STD, value); }
        }
		
        [DataMember]
        public string Description
        {
            get { return Convert.ToString(GetData(SalesContractReviewItemTable.C_DESCRIPTION)); }
            set { SetData(SalesContractReviewItemTable.C_DESCRIPTION, value); }
        }
		
        [DataMember]
        public DateTime ReqDate
        {
            get { return Convert.ToDateTime(GetData(SalesContractReviewItemTable.C_REQ_DATE)); }
            set { SetData(SalesContractReviewItemTable.C_REQ_DATE, value); }
        }
		
        [DataMember]
        public decimal Price
        {
            get { return Convert.ToDecimal(GetData(SalesContractReviewItemTable.C_PRICE)); }
            set { SetData(SalesContractReviewItemTable.C_PRICE, value); }
        }
		
        [DataMember]
        public int IsTax
        {
            get { return Convert.ToInt32(GetData(SalesContractReviewItemTable.C_IS_TAX)); }
            set { SetData(SalesContractReviewItemTable.C_IS_TAX, value); }
        }
		
		#endregion
	}
	
	
}	

